﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DetectScars.common
{
    class PlcData
    {

        //当前位置
        public static double x_position;
        public static double z_position;
        public static double w_position;
        public static double u_position;
        public static double v_position;
        //轴异常码
        public static string x_err_msg = "";
        public static string z_err_msg = "";
        public static string w_err_msg = "";
        public static string u_err_msg = "";
        public static string v_err_msg = "";
        //ID 25
        //绝对速度 相对速度 点速度 绝对位置 相对位置
        public static double x_velocity_abs;
        public static double x_velocity_rel;
        public static double x_velocity_jog;
        public static double x_position_abs;
        public static double x_position_rel;

        public static double z_velocity_abs;
        public static double z_velocity_jog;
        public static double z_position_abs;

        public static double w_velocity_abs;
        public static double w_velocity_rel;
        public static double w_velocity_jog;
        public static double w_position_abs;
        public static double w_position_rel;

        public static double u_velocity_abs;
        public static double u_velocity_rel;
        public static double u_position_abs;
        public static double u_position_rel;

        public static double v_velocity_abs;
        public static double v_velocity_rel;
        public static double v_velocity_jog;
        public static double v_position_abs;
        public static double v_position_rel;

        public static double z_velocity_rel;
        public static double z_position_rel;
        public static double u_velocity_jog;

        //QX 绝对完成 相对完成 回零完成 复位完成 停止完成
        public static bool x_position_abs_don;
        public static bool x_position_rel_don;
        public static bool x_home_don;
        public static bool x_reset_don;
        public static bool x_stop_don;
        public static bool x_err;

        public static bool z_position_abs_don;
        public static bool z_position_rel_don;
        public static bool z_home_don;
        public static bool z_reset_don;
        public static bool z_stop_don;
        public static bool z_err;

        public static bool w_position_abs_don;
        public static bool w_position_rel_don;
        public static bool w_home_don;
        public static bool w_reset_don;
        public static bool w_stop_don;
        public static bool w_err;

        public static bool u_position_abs_don;
        public static bool u_position_rel_don;
        public static bool u_home_don;
        public static bool u_reset_don;
        public static bool u_stop_don;
        public static bool u_err;

        public static bool v_position_abs_don;
        public static bool v_position_rel_don;
        public static bool v_home_don;
        public static bool v_reset_don;
        public static bool v_stop_don;
        public static bool v_err;

        //IX 绝对运行开始 相对运行开始 回零 反向点动 正向点动 复位 停止
        public static bool x_position_abs_run;
        public static bool x_position_rel_run;
        public static bool x_home;
        public static bool x_jog_b;
        public static bool x_jog_f;
        public static bool x_reset;
        public static bool x_stop;

        public static bool z_position_abs_run;
        public static bool z_position_rel_run;
        public static bool z_home;
        public static bool z_jog_b;
        public static bool z_jog_f;
        public static bool z_reset;
        public static bool z_stop;

        public static bool w_position_abs_run;
        public static bool w_position_rel_run;
        public static bool w_home;
        public static bool w_jog_b;
        public static bool w_jog_f;
        public static bool w_reset;
        public static bool w_stop;

        public static bool u_position_abs_run;
        public static bool u_position_rel_run;
        public static bool u_home;
        public static bool u_jog_b;
        public static bool u_jog_f;
        public static bool u_reset;
        public static bool u_stop;

        public static bool v_position_abs_run;
        public static bool v_position_rel_run;
        public static bool v_home;
        public static bool v_jog_b;
        public static bool v_jog_f;
        public static bool v_reset;
        public static bool v_stop;

        //C轴 变频速度 正转 反转
        public static int c_velocity;
        public static bool c_fz;
        public static bool c_zz;
        //W轴 位置模式 扭矩模式 最大速度 扭矩启动
        public static bool w_wzms;
        public static bool w_njms;
        public static int w_zdsd;
        public static bool w_njqd;
        public static double w_niuju;

        //急停
        public static bool stop_all;
    }
}
